<?php
class IndexAction extends FrontendAction
{
	public function execute()
	{
		/*
		 * @todo RBAC组件做好后，去掉这里的Cookie判断
		 */
		if (0 == $this->context->cookie['user_id'])
		{
			header("Location: " . Url::generate("User", "Signin"));
		}
		else
		{
			unset($this->view->layout);
			$this->view->mainFrameUrl = $this->context->request('main_frame_url') ? $this->context->request('main_frame_url') : 'about:blank';
			$this->view->render();
		}
		
	}
}
